body {
    /* background: #f2f2f2; */
    background: #282c34;
}

.frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    margin-top: -200px;
    margin-left: -200px;
    border-radius: 2px;
    box-shadow: 1px 2px 10px 0px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: #313c46;
    color: #fff;
    font-family: 'Open Sans', Helvetica, sans-serif;
}

#button {
    display: none;
}

.icon {
    position: absolute;
    width: 16px;
    height: 20px;
    top: 240px;
    left: 192px;
    cursor: pointer;

    .pause {
        position: absolute;
        width: 16px;
        height: 20px;
        top: 0;
        left: 0;
        transition: all 0.3s ease-in-out;
        transform: scale(1);
        opacity: 1;

        &:before,
        &:after {
            position: absolute;
            display: block;
            content: '';
            width: 5px;
            height: 20px;
            top: 0;
            left: 0;
            background: #fff;
        }
        &:after {
            left: initial;
            right: 0;
        }
    }

    .play {
        position: absolute;
        width: 0;
        height: 0;
        top: 0;
        left: 0;
        border-style: solid;
        border-width: 10px 0 10px 16px;
        border-color: transparent transparent transparent #fff;
        transition: all 0.3s ease-in-out;
        transform: scale(0);
        opacity: 0;
    }
}

#button:checked ~ .icon {
    .pause {
        transform: scale(0);
        opacity: 0;
    }
    .play {
        transform: scale(1);
        opacity: 1;
    }
}
#button:checked ~ .counter {
    .units,
    .tens,
    .hundreds,
    .thousands {
        animation-play-state: paused;
    }
}

.counter {
    box-sizing: border-box;
    position: absolute;
    width: 100px;
    height: 40px;
    top: 180px;
    left: 150px;
    background: #fff;
    border-radius: 3px;
    box-shadow: 2px 4px 8px 0 rgba(0, 0, 0, 0.3);
    padding: 0 6px;
    overflow: hidden;

    .number {
        float: left;
        .item {
            display: block;
            height: 40px;
            width: 22px;
            text-align: center;
            font-size: 30px;
            line-height: 40px;
            font-weight: 400;
            color: #478bb8;
        }
    }

    .units {
        animation: count 10s steps(10) infinite;
    }
    .tens {
        animation: count 100s steps(10) infinite;
    }
    .hundreds {
        animation: count 1000s steps(10) infinite;
    }
    .thousands {
        animation: count 10000s steps(10) infinite;
    }
}

@keyframes count {
    to {
        transform: translateY(-400px);
    }
}
